#include <iostream>
#include <iomanip>  // για setw()
using namespace std;

int main() {
    int choice;

    cout << "==============================" << endl;
    cout << "  ΜΕΤΑΤΡΟΠΗ ΘΕΡΜΟΚΡΑΣΙΩΝ" << endl;
    cout << "==============================" << endl;
    cout << "1. Μετατροπή Φαρενάιτ σε Κελσίου (F2C)" << endl;
    cout << "2. Μετατροπή Κελσίου σε Φαρενάιτ (C2F)" << endl;
    cout << "Επιλογή (1 ή 2): ";
    cin >> choice;

    cout << endl;

    if (choice == 1) {
        // --- Fahrenheit σε Celsius ---
        int fahr, celsius;
        int lower = 0;
        int upper = 300;
        int step = 20;

        cout << setw(10) << "Fahrenheit" << setw(10) << "Celsius" << endl;
        cout << "------------------------" << endl;

        fahr = lower;
        while (fahr <= upper) {
            celsius = 5 * (fahr - 32) / 9;
            cout << setw(10) << fahr << setw(10) << celsius << endl;
            fahr = fahr + step;
        }
    }
    else if (choice == 2) {
        // --- Celsius σε Fahrenheit ---
        double xanthi, thessaloniki, athina, xania, topok;

        cout << "Δώσε θερμοκρασίες (σε βαθμούς Κελσίου):" << endl;
        cout << "Ξάνθη: "; cin >> xanthi;
        cout << "Θεσσαλονίκη: "; cin >> thessaloniki;
        cout << "Αθήνα: "; cin >> athina;
        cout << "Χανιά: "; cin >> xania;
        cout << "Τόπος καταγωγής: "; cin >> topok;

        cout << endl << setw(10) << "Κελσίου" << setw(12) << "Φαρενάιτ" << endl;
        cout << "------------------------" << endl;

        cout << setw(10) << xanthi       << setw(12) << (xanthi * 9/5 + 32) << "  Ξάνθη" << endl;
        cout << setw(10) << thessaloniki << setw(12) << (thessaloniki * 9/5 + 32) << "  Θεσσαλονίκη" << endl;
        cout << setw(10) << athina       << setw(12) << (athina * 9/5 + 32) << "  Αθήνα" << endl;
        cout << setw(10) << xania        << setw(12) << (xania * 9/5 + 32) << "  Χανιά" << endl;
        cout << setw(10) << topok        << setw(12) << (topok * 9/5 + 32) << "  Τόπος Καταγωγής" << endl;
    }
    else {
        cout << "Μη έγκυρη επιλογή! Παρακαλώ τρέξτε ξανά το πρόγραμμα." << endl;
    }

    return 0;
}
